package com.test.application.designPatterns.singleton.demo2;

/**
 * 描述: 饿汉式二: 静态代码块方式
 * 作者: yanruizhi
 * 时间: 2024/9/18 16:56
 */
public class HungryManTwo {
    private static HungryManTwo instance;

    static {
        instance = new HungryManTwo();
    }

    private HungryManTwo() {

    }

    public static HungryManTwo getInstance() {
        return instance;
    }
}
